package com.corpgovernment.permission.entity.db;

import com.corpgovernment.common.entity.db.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.Table;

/**
 * 权限表DB对应的类
 *
 * @author llw
 */
@Data
@Table(name = "mb_permission_temp")
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class MbPermission extends BaseEntity {
    /**
     * id
     */
    @Column(name = "id")
    private Long id;
    /**
     * 资源名称
     */
    @Column(name = "res_name")
    private String resName;
    /**
     * 资源路径
     */
    @Column(name = "url")
    private String url;
    /**
     * 资源key
     */
    @Column(name = "res_key")
    private String resKey;
    /**
     * 父菜单Id  0 为顶级菜单
     */
    @Column(name = "parent_id")
    private Long parentId;
    /**
     * 非子菜单
     */
    @Column(name = "is_parent_menu")
    private Boolean isParentMenu;
    /**
     * 菜单排序，从小到大
     */
    @Column(name = "sort")
    private Integer sort;
    /**
     * 图标路径
     */
    @Column(name = "icon")
    private String icon;
    /**
     * 后台是否可切换公司
     */
    @Column(name = "canChangeCorp")
    private Boolean canChangeCorp;
    /**
     * 应用场景（N不限、B后台、F前台）
     */
    @Column(name = "scene")
    private String scene;

    /**
     *  此菜单是否可以设置数据权限(0、不可以 1、可以)
     */
    @Column(name = "up_data_permission")
    private Integer upDataPermission;
    /**
     * 删除状态 0:未删除 1:删除 默认是0
     */
    @Column(name = "is_deleted")
    private Boolean isDeleted;

    /**
     * 资源类型 0:菜单 1:按钮 默认是0
     */
    @Column(name = "res_type")
    private String resType;

    /**
     * 绑定的后端的URL
     */
    @Column(name = "service_url")
    private String serviceUrl;
    /**
     * 权限标识
     */
    @Column(name = "permission")
    private  String permission;
}
